package com.shopx.cm.dao.db1;

import com.shopx.cm.bean.CmMaterial;
import com.shopx.cm.dto.MaterialUserDTO;
import com.shopx.cm.dto.OrgDTO;
import com.shopx.cm.model.CmMaterialModel;
import com.shopx.dal.mysql.SqlMapper;

import java.util.List;

/**
 * TODO
 *
 * @author lituo
 * @className: CmMaterial
 * @date 2025-01-08
 */
@SqlMapper
public interface CmMaterialDao {
    /**
     * 查询明细记录
     *
     * @param cmMaterial
     * @return CmMaterialModel
     * @author lituo
     * @date 2025-01-08
     */
    CmMaterialModel selectByPrimaryKey(CmMaterial cmMaterial);

    CmMaterialModel selectByKey(CmMaterial cmMaterial);


    /**
     * 新增记录
     *
     * @param cmMaterial
     * @return int
     * @author lituo
     * @date 2025-01-08
     */
    int insertSelective(CmMaterial cmMaterial);

    /**
     * 修改记录
     *
     * @param cmMaterial
     * @return int
     * @author lituo
     * @date 2025-01-08
     */
    int updateByPrimaryKeySelective(CmMaterial cmMaterial);

    /**
     * 删除记录
     *
     * @param cmMaterial
     * @return int
     * @author lituo
     * @date 2025-01-08
     */
    int deleteByPrimaryKey(CmMaterial cmMaterial);

    /**
     * 查询总记录数
     *
     * @param cmMaterial
     * @return int
     * @author lituo
     * @date 2025-01-08
     */
    int selectCount(CmMaterialModel cmMaterial);

    /**
     * 查询列表
     *
     * @param cmMaterial
     * @return List<CmMaterialModel>
     * @author lituo
     * @date 2025-01-08
     */
    List<CmMaterialModel> selectList(CmMaterialModel cmMaterial);

    /**
     * 批量同步数据
     * @param list
     * @return
     */
    int insertBatch(List<MaterialUserDTO> list);

    /**
     * 清空数据重新抽取
     * @return
     */
    int truncateTable();
}

